Timm Bäder [Wed, 4 May 2016 13:25:59 +0000 (15:25 +0200)]
switch: Create less pango layouts
Instead of creating 2 pango layouts in every draw() and on in
_get_content_size (and calling into gettext twice in both cases), just
keep the layouts around and create them in only one place.
Matthias Clasen [Wed, 4 May 2016 15:19:03 +0000 (11:19 -0400)]
settings: Fix xsettings handling
I was somehow under the misconception that we'd get GdkEventSettings
events for all the xsettings at startup. That is not in general true,
so we need to make sure that we check for the xsettings value before
we use them, or derived fields. Update all the private getters to
do so; and fix settings_update_font_values() to cope with font
descriptions that might miss the family or size.
Matthias Clasen [Wed, 4 May 2016 10:28:59 +0000 (06:28 -0400)]
settings: Ensure derived fields are initialized
I mistakenly assumed that gtk_settings_init was already doing
something to trigger a notify for all properties. It doesn't,
so we have to ensure that settings_update_font_values() is
called at least once.
https://bugzilla.gnome.org/show_bug.cgi?id=765966
Matthias Clasen [Wed, 4 May 2016 03:14:05 +0000 (23:14 -0400)]
wayland: Small improvements to update_direction
Avoid memory allocation if possible, and use the proper
min/max keycodes.
Matthias Clasen [Wed, 4 May 2016 02:52:38 +0000 (22:52 -0400)]
wayland: Don't emit direction-changed unless it did
We can easily check this, so lets do it.
Matthias Clasen [Wed, 4 May 2016 02:36:20 +0000 (22:36 -0400)]
trivial formatting fixes
Matthias Clasen [Wed, 4 May 2016 02:15:17 +0000 (22:15 -0400)]
Use g_set_object in one more place
Timm Bäder [Tue, 3 May 2016 23:26:02 +0000 (19:26 -0400)]
label: don't use set_text in gtk_label_new
It would just set up lots of things with the default values, but a
common case is that a few gtk_label_set_* calls follow.
Kjartan Maraas [Tue, 3 May 2016 21:23:11 +0000 (23:23 +0200)]
Updated Norwegian bokmål translation.
Timm Bäder [Tue, 3 May 2016 20:07:50 +0000 (16:07 -0400)]
label: minimum/natural size parameters are not nullable
Stop comparing them to NULL.
Timm Bäder [Tue, 3 May 2016 20:04:58 +0000 (16:04 -0400)]
label: Don't set out parameters twice
We set them later again when we calculate the vertical size, so just
move the general assignment to -1 into the horizontal branch.
Timm Bäder [Tue, 3 May 2016 15:49:20 +0000 (17:49 +0200)]
widget: Remove useless NULL check
We are checking for allocation != NULL at the beginning of the function
already. This also means that the allocation parameter is not nullable.
Timm Bäder [Tue, 3 May 2016 14:58:02 +0000 (10:58 -0400)]
roundedbox: Initialize the hashtable key before using it
In mem_hash, we are iterating over the individual bytes of the key, so
make sure all of it is initialized.
Benjamin Otte [Tue, 3 May 2016 10:57:50 +0000 (12:57 +0200)]
cssimagebuiltin: Remove icons that don't draw anything anymore
Benjamin Otte [Mon, 2 May 2016 17:51:41 +0000 (19:51 +0200)]
cssimagebuiltin: Remove unused variables
Benjamin Otte [Mon, 2 May 2016 16:36:06 +0000 (18:36 +0200)]
widget: Remove useless comment
Olivier Fourdan [Tue, 3 May 2016 08:44:16 +0000 (10:44 +0200)]
wayland: fix up/down mix up in discrete events
The wayland specification for discrete step information for scroll and
other axes reads:
| The discrete value carries the directional information. e.g. a
| value of -2 is two steps towards the negative direction of this axis.
mutter sets a value of 1 for SCROLL_DOWN events and -1 for SCROLL_UP
events.
gdkdevice Wayland backend does the opposite, it translates a positive
discrete value as SCROLL_UP and a negative value as SCROLL_DOWN, which
ends up inverting the scrolling direction.
Fix the logic in gdkdevice Wayland to use a positive value as
SCROLL_DOWN and a negative value as SCROLL_UP so that it matches mutter
and weston logic.
https://bugzilla.gnome.org/show_bug.cgi?id=765907
Matthias Clasen [Mon, 2 May 2016 17:30:20 +0000 (13:30 -0400)]
css: Stop drawing double borders for builtins
The fallback code for rendering builtin checks, radios
and expanders was using border parameters. With the generic
gadget borders using the same parameters, this was giving
double borders.
Timm Bäder [Sat, 30 Apr 2016 19:06:07 +0000 (21:06 +0200)]
shadowsvalue: Don't draw invisible box shadows
Matthias Clasen [Mon, 2 May 2016 16:40:51 +0000 (12:40 -0400)]
defaultvalue test: Skip GdkMonitor::geometry
We never return NULL for ::geometry and ::workarea. Just skip
these properties.
Matthias Clasen [Mon, 2 May 2016 16:40:24 +0000 (12:40 -0400)]
GdkMonitor: Fix refresh-rate property
We were using g_value_set_boolean for an integer property.
Руслан Ижбулатов [Mon, 2 May 2016 14:45:44 +0000 (14:45 +0000)]
Use default VFS, not a local one (it has no network)
Matthias Clasen [Mon, 2 May 2016 11:38:26 +0000 (07:38 -0400)]
Fix gtk_paned_set_position to set position_set consistently
As pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=765676,
we were failing to set position_set if the position did not change.
Carlos Soriano [Mon, 2 May 2016 09:56:23 +0000 (11:56 +0200)]
testnotebookdnd: add one GtkListBox as tab content
To make sure we test regressions on widgets that bubble up motion
handling and can trigger the motion handling code path on GtkNotebook.
https://bugzilla.gnome.org/show_bug.cgi?id=764395
Carlos Soriano [Mon, 2 May 2016 08:19:12 +0000 (10:19 +0200)]
gtknotebook: avoid tab dnd from content
Before commit
6c1bee2377eba8 we were setting an attribute of GtkNotebook
to track the pressed button if the pressed button happened on the
tab itself.
Later in the motion handling code we were checking whether the private
pressed button attribute was set or not in order to handle a tab dnd
or not.
In commit
6c1bee2377eba8 the code changed and set the pressed button
variable unconditionally, which means, a motion event from within the
tab content triggered a tab reordering.
This happened only if the children hierarchy have a widget that bubbles
up both button press event, which sets the private pressed button
attribute; and motion events, which started the tab dnd checking the
private pressed button attribute.
A widget that experienced the regression was GtkListBox.
In order to fix it, set the button pressed variable only when it press
the tab itself, not the content.
https://bugzilla.gnome.org/show_bug.cgi?id=764395
Руслан Ижбулатов [Sun, 1 May 2016 19:00:25 +0000 (19:00 +0000)]
GtkPlacesView: check for network:// URI support before using it
Specifically, this URI is not supported on Windows, but GFile will
do its "best" and turn it into GLocalFile("$pwd/network"), with
spectacularly bad results.
https://bugzilla.gnome.org/show_bug.cgi?id=765858
Carlos Garnacho [Sun, 1 May 2016 18:05:56 +0000 (20:05 +0200)]
gdkevents: Free motion events discarded by motion compression
Those should be freed together with their list link.
Matthias Clasen [Sun, 1 May 2016 17:25:51 +0000 (13:25 -0400)]
dnd: Make sure to free a stashed event
I am not sure if this happens in practice, but better to be safe.
Matthias Clasen [Sun, 1 May 2016 17:23:12 +0000 (13:23 -0400)]
gesture: Don't leak stashed events
These events were never freed.
Matthias Clasen [Sun, 1 May 2016 17:18:55 +0000 (13:18 -0400)]
Avoid copying an event
Not a big deal, but we can be a bit more efficient when generating
grab-broken events.
Matthias Clasen [Sun, 1 May 2016 15:28:37 +0000 (11:28 -0400)]
Small docs improvement
Cross reference from gdk_event_get_keycode to
gdk_event_get_scancode.
Matthias Clasen [Sun, 1 May 2016 15:22:55 +0000 (11:22 -0400)]
Drop unused macros
These have been sitting here forever, unused. Time to drop them
Matthias Clasen [Sun, 1 May 2016 15:09:05 +0000 (11:09 -0400)]
x11: drop a useless list
We were keeping all the event sources in a list, only to remove
them at the end of their life. Not useful.
Matthias Clasen [Sun, 1 May 2016 15:06:33 +0000 (11:06 -0400)]
wayland: drop a useless list
We were keeping all the event sources in a list, only to remove
them at the end of their life. Not useful.
Matthias Clasen [Sun, 1 May 2016 17:26:09 +0000 (13:26 -0400)]
Fix the build
I forgot to add an include here.
Matthias Clasen [Sun, 1 May 2016 14:52:31 +0000 (10:52 -0400)]
wayland: Tag the event source with the acutal display name
Matthias Clasen [Sun, 1 May 2016 14:51:41 +0000 (10:51 -0400)]
wayland: Make gdk_display_get_name work
It should just return the same as gdk_screen_make_display_name.
Matthias Clasen [Sun, 1 May 2016 05:10:59 +0000 (01:10 -0400)]
css: Use setters for font size and family
This avoid creating pango font descriptions all the time, when
the gtk-font-name setting hasn't actually changed.
Matthias Clasen [Sun, 1 May 2016 05:10:33 +0000 (01:10 -0400)]
settings: Add setters for font family and size
Matthias Clasen [Sun, 1 May 2016 04:40:23 +0000 (00:40 -0400)]
treeview: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:40:08 +0000 (00:40 -0400)]
switch: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:39:55 +0000 (00:39 -0400)]
stack: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:39:34 +0000 (00:39 -0400)]
scrolled window: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:39:18 +0000 (00:39 -0400)]
Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:39:03 +0000 (00:39 -0400)]
popover: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 03:15:20 +0000 (23:15 -0400)]
Use a variable consistently
Matthias Clasen [Sun, 1 May 2016 02:39:26 +0000 (22:39 -0400)]
Use a better hash for arcs
Matthias Clasen [Sun, 1 May 2016 02:00:35 +0000 (22:00 -0400)]
css: Use a getter for the enable-animations setting
Matthias Clasen [Sun, 1 May 2016 02:00:19 +0000 (22:00 -0400)]
dnd: Use a getter for the drag threshold
Matthias Clasen [Sun, 1 May 2016 02:00:06 +0000 (22:00 -0400)]
Add a few settings getters
Matthias Clasen [Sun, 1 May 2016 01:06:38 +0000 (21:06 -0400)]
Trivial whitespace fix
Matthias Clasen [Sun, 1 May 2016 00:59:16 +0000 (20:59 -0400)]
Use the new getter
This avoids the use of generic api in the per-event code path.
Matthias Clasen [Sun, 1 May 2016 00:52:09 +0000 (20:52 -0400)]
gdk: Add a private getter for GdkDevice::input-mode
Matthias Clasen [Sat, 30 Apr 2016 20:29:16 +0000 (16:29 -0400)]
Add a forgotten deprecation
gdk_display_get_screen is marked as deprecated in the docs.
Руслан Ижбулатов [Fri, 29 Apr 2016 15:54:52 +0000 (15:54 +0000)]
W32: support cairo library in non-standard locations
When checking for cairo_win32_surface_create_with_format in -lcairo,
temporarily put CAIRO_LIBS into LIBS so that AC_CHECK_LIB() can
find it in weird places like /usr/local/lib, where gcc would not look
on its own.
https://bugzilla.gnome.org/show_bug.cgi?id=765793
GNOME Translation Robot [Fri, 29 Apr 2016 08:41:50 +0000 (08:41 +0000)]
Updated Scottish Gaelic translation
Руслан Ижбулатов [Fri, 29 Apr 2016 01:19:23 +0000 (01:19 +0000)]
W32: reword the error about required cairo version
1.14.x series does not contain the functionality needed by GTK+.
Advise to use 1.15.x (1.15.2 is available) or 1.16.x (yet to be released).
https://bugzilla.gnome.org/show_bug.cgi?id=765790
Matthias Clasen [Wed, 27 Apr 2016 04:00:19 +0000 (00:00 -0400)]
settings: Cache xsettings
Instead of calling out to gdk every time an XSetting is requested,
cache the value (we already have the property_values array
anyway).
https://bugzilla.gnome.org/show_bug.cgi?id=765579
Matthias Clasen [Fri, 29 Apr 2016 01:55:52 +0000 (21:55 -0400)]
box gadget: Redo expand flag handling
We only keep one align flag per child, so it seems odd to
keep separate h/v expand flags. Just keep one expand flag
and interpret it according to orientation. Allow setting
the expand flag for child widgets too, though, so we can
make widget expand without interfering with the recursive
widget expand flag.
Update all callers.
Use the new possibility of expanding child widgets to make
the label of check and radio buttons expand. This fixes
unexpected behavior of these widgets in RTL in some places.
https://bugzilla.gnome.org/show_bug.cgi?id=765742
Matthias Clasen [Fri, 29 Apr 2016 01:30:01 +0000 (21:30 -0400)]
expander: Reverse alignments in RTL
Flip alignments of the title gadget children.
Matthias Clasen [Fri, 29 Apr 2016 01:29:32 +0000 (21:29 -0400)]
check button: Reverse alignments in RTL
Flip alignments for the box gadget children.
Matthias Clasen [Fri, 29 Apr 2016 01:27:02 +0000 (21:27 -0400)]
box gadget: allow reversing alignments
In RTL, we want to interpret GTK_ALIGN_START and _END
in the opposite way. Since we don't give gadgets a text
direction, just allow setting an align_reverse flag
to the box gadget.
Lapo Calamandrei [Thu, 28 Apr 2016 13:45:12 +0000 (15:45 +0200)]
Adwaita: refactor levelbar styling.
Rico Tzschichholz [Thu, 28 Apr 2016 08:20:15 +0000 (10:20 +0200)]
broadway: Fix include rules in gdkbroadwaymonitor.h
Fixes
044109c8c73f5c1d9eb470c857112c08a005b0ae
Daniel Mustieles [Thu, 28 Apr 2016 08:06:10 +0000 (08:06 +0000)]
Updated Spanish translation
Matthias Clasen [Mon, 11 Apr 2016 03:52:00 +0000 (23:52 -0400)]
window: Stop using gdk_screen_get_n_monitors
Matthias Clasen [Mon, 11 Apr 2016 03:44:05 +0000 (23:44 -0400)]
settings: Stop comparing screen numbers
There is only one screen.
Matthias Clasen [Mon, 11 Apr 2016 03:45:11 +0000 (23:45 -0400)]
window: Stop using screen width/height
Matthias Clasen [Mon, 11 Apr 2016 03:44:28 +0000 (23:44 -0400)]
treeview: Stop using screen width/height
Popups should always be placed relative to a monitor.
Matthias Clasen [Mon, 11 Apr 2016 03:43:34 +0000 (23:43 -0400)]
label: Stop using screen width/height
Popups should always be placed relative to a monitor.
Matthias Clasen [Mon, 11 Apr 2016 03:42:57 +0000 (23:42 -0400)]
combobox: Stop using screen width/height
Popups should always be placed relative to a monitor.
Matthias Clasen [Mon, 11 Apr 2016 03:01:10 +0000 (23:01 -0400)]
gtk: Port to new monitor api
Use the GdkDisplay monitor api instead of the GdkScreen one.
Matthias Clasen [Mon, 11 Apr 2016 02:59:53 +0000 (22:59 -0400)]
menu: Add new monitor api
This will work better with the new monitor api in gdk.
Matthias Clasen [Sat, 2 Apr 2016 23:22:36 +0000 (19:22 -0400)]
inspector: Port to new monitor api
Adapt to new monitor apis, and show more information.
Руслан Ижбулатов [Wed, 20 Apr 2016 07:36:00 +0000 (07:36 +0000)]
win32: Port to new monitor api
Matthias Clasen [Thu, 28 Apr 2016 03:08:25 +0000 (23:08 -0400)]
x11: Bring back fullscreen-on-all-monitors support
It is unfortunate the EWMH requires Xinerama here - lets do this
without the caching that was previously there, I don't think it is
needed.
Matthias Clasen [Sun, 3 Apr 2016 04:12:39 +0000 (00:12 -0400)]
x11: Port to new monitor api
Matthias Clasen [Sun, 3 Apr 2016 04:15:42 +0000 (00:15 -0400)]
x11: Drop Xinerama
It may come back after the monitor conversion.
Matthias Clasen [Sun, 3 Apr 2016 03:42:40 +0000 (23:42 -0400)]
broadway: Port to new monitor api
Matthias Clasen [Sat, 2 Apr 2016 14:18:56 +0000 (10:18 -0400)]
wayland: Port to new monitor api
Matthias Clasen [Thu, 28 Apr 2016 02:51:42 +0000 (22:51 -0400)]
integrate docs
Matthias Clasen [Sat, 2 Apr 2016 14:18:16 +0000 (10:18 -0400)]
screen: Implement old monitor apis generically
Implement all the monitor-related GdkScreen apis based on GdkMonitor.
Matthias Clasen [Mon, 25 Apr 2016 13:07:56 +0000 (09:07 -0400)]
Add a fallback for unconverted backends
If the monitor vfuncs are not implemented in a display class,
fall back to providing a single monitor object representing
the entire screen. This is not meant to be 'good enough', it
is just to provide some implementation until all backends
implement the monitor vfuncs. When that is the case, the
fallback should be removed.
Matthias Clasen [Fri, 1 Apr 2016 03:10:37 +0000 (23:10 -0400)]
display: Add new monitor apis
This follows our general direction of moving functionality
from GdkScreen to GdkDisplay.
Matthias Clasen [Fri, 1 Apr 2016 03:10:04 +0000 (23:10 -0400)]
Add GdkMonitor
Add a simple object representing a monitor.
Christian Hergert [Thu, 28 Apr 2016 02:02:25 +0000 (19:02 -0700)]
Revert "iconhelper: check if surface was invalidated"
This reverts commit
88d02583974659d1d37d825df78c79bee4c95d0e.
Руслан Ижбулатов [Tue, 26 Apr 2016 21:45:15 +0000 (21:45 +0000)]
GtkTreeView: change child repositioning to preserve locality
If there was a piece of text in the cell, then when the edit
entry is shown for that cell, it should have a piece of text
in it roughly at the same location.
Therefore, when child widget is enlarged (child preferred
size exceeds cell size), extra width should be added by
extending either left or right edge depending on text direction.
If after that the child sticks outside of the treeivew visible region,
try to push it back inside (breaking its alignment with the
cell), again, giving preference (i.e. adjusting it last)
to either left or right edge depending on text direction.
https://bugzilla.gnome.org/show_bug.cgi?id=765471
Christian Hergert [Thu, 28 Apr 2016 00:45:01 +0000 (17:45 -0700)]
iconhelper: check if surface was invalidated
Fetching the style may cause the surface to be invalidated.
Balázs Meskó [Wed, 27 Apr 2016 19:32:14 +0000 (19:32 +0000)]
Updated Hungarian translation
Daniel Mustieles [Wed, 27 Apr 2016 19:07:11 +0000 (21:07 +0200)]
Updated Spanish translation
Lapo Calamandrei [Wed, 27 Apr 2016 18:04:39 +0000 (20:04 +0200)]
Adwaita: add a background to cellrendertext
Matthias Clasen [Wed, 27 Apr 2016 11:37:56 +0000 (07:37 -0400)]
3.21.1
Matthias Clasen [Wed, 27 Apr 2016 11:37:43 +0000 (07:37 -0400)]
Updates
Daniel Stone [Wed, 27 Apr 2016 12:06:38 +0000 (14:06 +0200)]
wayland: Ignore NoSymbol keys
NoSymbol is not a valid GDK symbol (it only has the concept of
VoidSymbol, for some reason, which is neither the same thing nor
produced by any sane keymap). Passing NoSymbol events through to GTK+
apps is unlikely to produce anything useful.
In particular, this meant VTE would scroll to the end of the buffer when
pressing Fn (required for Page Up/Down on Macs), as it was receiving a
keypress that wasn't a modifeir. This does not happen on X11, as the
KEY_FN keycode is above 255, so does not get sent to clients.
https://bugzilla.gnome.org/show_bug.cgi?id=764825
Georges Basile Stavracas Neto [Wed, 27 Apr 2016 12:06:46 +0000 (09:06 -0300)]
placesview: update a leftover function name
This should've been part of the previous commit.
Georges Basile Stavracas Neto [Tue, 26 Apr 2016 12:57:36 +0000 (09:57 -0300)]
placesview: follow up fixes
This patch unmarks the addresses' prefixes as translatable,
and updates the callback name to reflect what it really does
now.
This is a follow up fix from commit
7449add82.
https://bugzilla.gnome.org/show_bug.cgi?id=756570
Carlos Garnacho [Wed, 27 Apr 2016 10:12:18 +0000 (12:12 +0200)]
wayland: Perform seat grab focus checks on native windows
We don't care about the specific (possibly client-side) window that
requested the focus here, only the toplevel. Fixes mistakenly sent
focus events when the grab happens inside the current focus window.
https://bugzilla.gnome.org/show_bug.cgi?id=762756
Christian Hergert [Wed, 27 Apr 2016 02:30:30 +0000 (19:30 -0700)]
pixelcache: reuse existing timeout source when possible
This avoids the g_source_remove(), g_source_destroy(),
g_timer_source_new(), and g_source_set_name_by_id() in the common case.
Instead, we reuse our previous source and update the ready time to our
new deadline. We lose the coalescing with g_timeout_add_seconds(), but
that is not going to help in the common case anyway (unless you have
three hands and can scroll multiple pixelcached backed widgets at once).
https://bugzilla.gnome.org/show_bug.cgi?id=765640
Daniel Mustieles [Wed, 27 Apr 2016 07:47:56 +0000 (07:47 +0000)]
Updated Spanish translation
Matthias Clasen [Wed, 27 Apr 2016 02:02:34 +0000 (22:02 -0400)]
dnd: Fix some issues with drag icons
In non-composited environments, we were ending up with all-black
drag icons, because nothing was drawing the background of our new
toplevel. Fix this by drawing background when we are not composited.
We don't do this when composited, since we want to allow transparent
icons.